const state = {  
  selectedId: null, // 假设我们要存储的ID  
};  
  
const mutations = {    
  SET_SELECTED_ID(state, id) {  
    state.selectedId = id;  
  },
};  
  
const actions = {  
  setSelectedId({ commit }, id) {  
    commit('SET_SELECTED_ID', id);  
  },
};  
  
export default {  
  namespaced: true,
  state,
  mutations,
  actions 
};